﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MDS
{
    [DBF(993, 265)]
    public struct Show2003DBFRecord
    {
        [DBFRecordField(0, 1,"")]
        public string StopFlagStr;
        [DBFRecordField(1, 6,"S1")]
        public string StkId;
        [DBFRecordField(7, 8,"S2")]
        public string StkName;
        [DBFRecordField(15, 8,"S3")]
        public double ClosePrice;
        [DBFRecordField(23, 8,"S4")]
        public double OpenPrice;
        [DBFRecordField(43, 8,"S6")]
        public double HighPrice;
        [DBFRecordField(51, 8,"S7")]
        public double LowPrice;
        [DBFRecordField(59, 8,"S8")]
        public double KnockPrice;
        [DBFRecordField(31, 12,"S5")]
        public double TotalMktKnockAmt;
        [DBFRecordField(83, 10,"S11")]
        public long TotalMktKnockQty;

        [DBFRecordField(101, 10,"S15")]
        public int BuyQty1;
        [DBFRecordField(119, 10,"S17")]
        public int BuyQty2;
        [DBFRecordField(137, 10,"S19")]
        public int BuyQty3;
        [DBFRecordField(201, 10,"S27")]
        public int BuyQty4;
        [DBFRecordField(219, 10,"S29")]
        public int BuyQty5;
        [DBFRecordField(67, 8,"S9")]
        public double BuyPrice1;
        [DBFRecordField(111, 8,"S16")]
        public double BuyPrice2;
        [DBFRecordField(129, 8,"S18")]
        public double BuyPrice3;
        [DBFRecordField(193, 8,"S26")]
        public double BuyPrice4;
        [DBFRecordField(211, 8,"S28")]
        public double BuyPrice5;
        [DBFRecordField(147, 10,"S21")]
        public int SellQty1;
        [DBFRecordField(165, 10,"S23")]
        public int SellQty2;
        [DBFRecordField(183, 10,"S25")]
        public int SellQty3;
        [DBFRecordField(237, 10,"S31")]
        public int SellQty4;
        [DBFRecordField(255, 10,"S33")]
        public int SellQty5;
        [DBFRecordField(75, 8,"S10")]
        public double SellPrice1;
        [DBFRecordField(157, 8,"S22")]
        public double SellPrice2;
        [DBFRecordField(175, 8,"S24")]
        public double SellPrice3;
        [DBFRecordField(229, 8,"S30")]
        public double SellPrice4;
        [DBFRecordField(247, 8,"S32")]
        public double SellPrice5;



        public bool StopFlag
        {
            get
            {
                if (string.IsNullOrEmpty(StopFlagStr))
                    return false;
                else if (StopFlagStr[0] == 0x2a)
                {
                    return true;
                }
                else
                    return false;
            }
        }

    }
}
